<%@ page language="java" import="dao.*" pageEncoding="UTF-8" %>
 <%@ page language="java" import="java.util.*" %>
 <%@page import="util.*" %>
 <%@ include file="head.jsp" %>

<script src="js/jquery.validate.js"></script>
<script src="js/datepicker/WdatePicker.js"></script>

<div style="padding: 10px" class="admin-content">
    <% if (request.getSession().getAttribute("username") == null || "".equals(request.getSession().getAttribute("username"))) { %>

    <script>
        alert("对不起,请您先登陆!");
        location.href = "login.jsp";
    </script>
    <%return;
    } %> <%
     String updtself = "0"; // 设置更新
     HashMap mmm = new CommDAO().getmap(request.getParameter("id"), "xuejixinxi");
     %>


    <div class="container">
        <!-- 使用bootstrap css框架，container定宽，并剧中 https://v3.bootcss.com/css/#overview-container -->

        <div class="panel panel-default">
            <div class="panel-heading">编辑学籍信息:</div>
            <div class="panel-body">
                <form action="xuejixinxi.jsp?a=update" method="post" name="form1" id="form1">
                    <!-- form 标签开始 -->

                    <input type="hidden" name="xueshengxinxiid" value="<%= mmm.get("xueshengxinxiid") %>" />
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs">学号</label>
                            <div class="col-sm-10"><%= mmm.get("xuehao") %><input type="hidden" id="xuehao" name="xuehao" value="<%= Info.html(mmm.get("xuehao")) %>" /></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs">姓名</label>
                            <div class="col-sm-10"><%= mmm.get("xingming") %><input type="hidden" id="xingming" name="xingming" value="<%= Info.html(mmm.get("xingming")) %>" /></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs">入学时间</label>
                            <div class="col-sm-10"><%= mmm.get("ruxueshijian") %><input type="hidden" id="ruxueshijian" name="ruxueshijian" value="<%= Info.html(mmm.get("ruxueshijian")) %>" /></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs">联系电话</label>
                            <div class="col-sm-10"><%= mmm.get("lianxidianhua") %><input type="hidden" id="lianxidianhua" name="lianxidianhua" value="<%= Info.html(mmm.get("lianxidianhua")) %>" /></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs">学期</label>
                            <div class="col-sm-10"><% Map mapxueqixinxi20 = new CommDAO().find("SELECT xueqimingcheng,id FROM xueqixinxi where id='" + mmm.get("xueqi") + "'"); %>
<%= mapxueqixinxi20.get("xueqimingcheng") %><input type="hidden" id="xueqi" name="xueqi" value="<%= Info.html(mmm.get("xueqi")) %>" /></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs">班级</label>
                            <div class="col-sm-10"><% Map mapbanjixinxi21 = new CommDAO().find("SELECT banjimingcheng,id FROM banjixinxi where id='" + mmm.get("banji") + "'"); %>
<%= mapbanjixinxi21.get("banjimingcheng") %><input type="hidden" id="banji" name="banji" value="<%= Info.html(mmm.get("banji")) %>" /></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs">头像</label>
                            <div class="col-sm-10">
                                <% if ("".equals(mmm.get("touxiang"))) { %>
-<%} else { %><img width="100" src="<%= mmm.get("touxiang") %>" /><%} %>
<input
                                    type="hidden"
                                    id="touxiang"
                                    name="touxiang"
                                    value="<%= Info.html(mmm.get("touxiang")) %>"
                                />
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs">出生年月日<span style="color: red">*</span></label>
                            <div class="col-sm-10">
                                <input
                                    type="text"
                                    class="form-control"
                                    onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',lang:'zh-cn'})"
                                    style="width: 120px"
                                    data-rule-required="true"
                                    data-msg-required="请填写出生年月日"
                                    id="chushengnianyueri"
                                    name="chushengnianyueri"
                                    readonly="readonly"
                                    value="<%= Info.html(mmm.get("chushengnianyueri")) %>"
                                />
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs">籍贯<span style="color: red">*</span></label>
                            <div class="col-sm-10">
                                <input
                                    type="text"
                                    class="form-control"
                                    placeholder="输入籍贯"
                                    style="width: 150px"
                                    data-rule-required="true"
                                    data-msg-required="请填写籍贯"
                                    id="jiguan"
                                    name="jiguan"
                                    value="<%= Info.html(mmm.get("jiguan")) %>"
                                />
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs">户口类型<span style="color: red">*</span></label>
                            <div class="col-sm-10">
                                <input
                                    type="text"
                                    class="form-control"
                                    placeholder="输入户口类型"
                                    style="width: 150px"
                                    data-rule-required="true"
                                    data-msg-required="请填写户口类型"
                                    id="hukouleixing"
                                    name="hukouleixing"
                                    value="<%= Info.html(mmm.get("hukouleixing")) %>"
                                />
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs">政治面貌<span style="color: red">*</span></label>
                            <div class="col-sm-10">
                                <input
                                    type="text"
                                    class="form-control"
                                    placeholder="输入政治面貌"
                                    style="width: 150px"
                                    data-rule-required="true"
                                    data-msg-required="请填写政治面貌"
                                    id="zhengzhimianmao"
                                    name="zhengzhimianmao"
                                    value="<%= Info.html(mmm.get("zhengzhimianmao")) %>"
                                />
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs">家庭地址<span style="color: red">*</span></label>
                            <div class="col-sm-10">
                                <input
                                    type="text"
                                    class="form-control"
                                    placeholder="输入家庭地址"
                                    style="width: 150px"
                                    data-rule-required="true"
                                    data-msg-required="请填写家庭地址"
                                    id="jiatingdizhi"
                                    name="jiatingdizhi"
                                    value="<%= Info.html(mmm.get("jiatingdizhi")) %>"
                                />
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs">紧急联系人<span style="color: red">*</span></label>
                            <div class="col-sm-10">
                                <input
                                    type="text"
                                    class="form-control"
                                    placeholder="输入紧急联系人"
                                    style="width: 150px"
                                    data-rule-required="true"
                                    data-msg-required="请填写紧急联系人"
                                    id="jinjilianxiren"
                                    name="jinjilianxiren"
                                    value="<%= Info.html(mmm.get("jinjilianxiren")) %>"
                                />
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs">联系人电话<span style="color: red">*</span></label>
                            <div class="col-sm-10">
                                <input
                                    type="text"
                                    class="form-control"
                                    placeholder="输入联系人电话"
                                    style="width: 150px"
                                    data-rule-required="true"
                                    data-msg-required="请填写联系人电话"
                                    phone="true"
                                    data-msg-phone="请输入正确手机号码"
                                    id="lianxirendianhua"
                                    name="lianxirendianhua"
                                    value="<%= Info.html(mmm.get("lianxirendianhua")) %>"
                                />
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs">备注</label>
                            <div class="col-sm-10">
                                <textarea style="width: 80%; height: 120px" class="form-control" placeholder="输入备注" id="beizhu" name="beizhu"><%= Info.html(mmm.get("beizhu")) %></textarea>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label style="text-align: right" class="col-sm-2 hiddex-xs"> </label>
                            <div class="col-sm-10">
                                <input name="id" value="<%= mmm.get("id") %>" type="hidden" />
                                <input name="referer" value="<%=request.getHeader("referer") %>" type="hidden" />
                                <input name="updtself" value="<%= updtself %>" type="hidden" />

                                <button type="submit" class="btn btn-primary" name="Submit">提交</button>
                                <button type="reset" class="btn btn-default" name="Submit2">重置</button>
                            </div>
                        </div>
                    </div>

                    <!--form标签结束-->
                </form>
            </div>
        </div>

        <!-- container定宽，并剧中结束 -->
    </div>

    <script>
        $(function () {
            $("#form1").validate();
        });
    </script>
</div>
<%@ include file="foot.jsp" %>

